import React , {Component} from "react"
import {NavLink} from "react-router-dom"

export default class Foot extends Component{
    constructor(props){
        super(props);
        this.state = {
           
        }
    }

    static defaultProps = {
        footList:[
            {path:"/layout/index",txt:"首页",icon:"icon-kongzhitaishouye"},
            {path:"/layout/recommend",txt:"推荐",icon:"icon-tuijianma"},
            {path:"/layout/college",txt:"学院",icon:"icon-xueyuan"},
            {path:"/layout/personal",txt:"个人",icon:"icon-webicon08"},
        ]
    }

    render(){
        const foots =  this.props.footList.map((item,idx)=>{
            return (
                <div key={idx}>
                    <div className="icon">
                        <NavLink to={item.path} activeClassName="router-link-active" >
                            <i className={"iconfont "+item.icon}></i>
                        </NavLink>
                    </div>
                    <NavLink to={item.path} activeClassName="ft-active-1" >
                    <span>{item.txt }</span>
                    </NavLink>
                    
                    
                </div>
            )
        })
        return (
            <footer>
                {
                   foots
                }
            </footer>
        )
    }
}